<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="David Rodr&iacute;guez Condezo">
    <meta name="author" content="David Rodr&iacute;guez Condezo">	 
	<link rel="stylesheet" href="css/jquery.mobile.structure-1.3.0.css">
	<link rel="stylesheet" href="temas/clasico.css">	
	<script src="js/jquery-1.9.1.js"></script>
	<script src="js/jquery.mobile-1.3.0.js"></script>		
</head>

<body>
<div data-role="page" id="pagina1" data-theme="a">
    <div data-role="header">
	<h3>PEDIDOS DE CANCIONES</h3>
    </div>
<form id="form1" name="form1" method="post" action="ServletPedidoBuscarCan">
<p>Seleccione su Cancion: 
    <label><input type="text" name="nombre" id="nombre" /></label>
    <label><input type="submit" name="button" id="button" value="Buscar" /></label>
    <label><input type="button" name="button2" id="button2" value="Regresar" onclick="window.location='FormPedidoInicio.jsp'" /></label>

<table width="500" height="30" border="2" cellpadding="0" cellspacing="0">
  <tr>
    <th width="40" scope  ="col">Indice</th>
    <th width="10" scope  ="col">Codigo</th>
    <th width="70" scope="col">Nombre</th>
    <th width="10" scope="col">Seleccionar</th>
  </tr>

<%@page import="java.util.*, javamusic.modelo.Pedido" %>
<%@page import="java.util.*, javamusic.modelo.Cancion" %>
<%
Collection<Cancion> arreglo = (ArrayList<Cancion>)request.getAttribute("Pedido_Cancion");
if(arreglo != null) { 
int i = 1;
for(Cancion x : arreglo) {
%>  
  <tr>
    <td><%=i++ %></td>
    <td><% out.print(x.getIdcancion()); %></td>
    <td><% out.print(x.getNombre()); %></td>
    <td><a href="<%=request.getContextPath() %>/ServletPedidoSeleccionarCan?id=<%=x.getIdcancion()%>">Seleccionar</a></td>
  </tr> 
<% System.out.println(request.getContextPath()); } } %> 
</table>

</form>	
</body>
</html>